<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QSculpt: engine/include/ISurface.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QSculpt
   &#160;<span id="projectnumber">0.0.1a</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">engine/include/ISurface.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> *   Copyright (C) 2006 by Juan Roberto Cabral Flores   *</span>
<a name="l00003"></a>00003 <span class="comment"> *   roberto.cabral@gmail.com   *</span>
<a name="l00004"></a>00004 <span class="comment"> *                                                                         *</span>
<a name="l00005"></a>00005 <span class="comment"> *   This program is free software; you can redistribute it and/or modify  *</span>
<a name="l00006"></a>00006 <span class="comment"> *   it under the terms of the GNU General Public License as published by  *</span>
<a name="l00007"></a>00007 <span class="comment"> *   the Free Software Foundation; either version 2 of the License, or     *</span>
<a name="l00008"></a>00008 <span class="comment"> *   (at your option) any later version.                                   *</span>
<a name="l00009"></a>00009 <span class="comment"> *                                                                         *</span>
<a name="l00010"></a>00010 <span class="comment"> *   This program is distributed in the hope that it will be useful,       *</span>
<a name="l00011"></a>00011 <span class="comment"> *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *</span>
<a name="l00012"></a>00012 <span class="comment"> *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *</span>
<a name="l00013"></a>00013 <span class="comment"> *   GNU General Public License for more details.                          *</span>
<a name="l00014"></a>00014 <span class="comment"> *                                                                         *</span>
<a name="l00015"></a>00015 <span class="comment"> *   You should have received a copy of the GNU General Public License     *</span>
<a name="l00016"></a>00016 <span class="comment"> *   along with this program; if not, write to the                         *</span>
<a name="l00017"></a>00017 <span class="comment"> *   Free Software Foundation, Inc.,                                       *</span>
<a name="l00018"></a>00018 <span class="comment"> *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *</span>
<a name="l00019"></a>00019 <span class="comment"> ***************************************************************************/</span>
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef IOBJECT3D_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define IOBJECT3D_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;QtCore/QObject&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;QtCore/QVector&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;Point3D.h&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;SpEnums.h&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;IIterator.h&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;Vertex.h&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;Face.h&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;geometry/Aabb.h&quot;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="comment">/*</span>
<a name="l00034"></a>00034 <span class="comment"> * Class forward declaration</span>
<a name="l00035"></a>00035 <span class="comment"> */</span>
<a name="l00036"></a>00036 <span class="keyword">class </span><a class="code" href="class_color.html">Color</a>;
<a name="l00037"></a>00037 <span class="keyword">class </span><a class="code" href="class_scene.html">Scene</a>;
<a name="l00038"></a>00038 
<a name="l00044"></a><a class="code" href="class_i_surface.html">00044</a> <span class="keyword">class </span><a class="code" href="class_i_surface.html">ISurface</a> : <span class="keyword">public</span> QObject {
<a name="l00045"></a>00045     Q_OBJECT
<a name="l00046"></a>00046     
<a name="l00047"></a>00047 <span class="keyword">public</span>:
<a name="l00048"></a>00048     <span class="keyword">typedef</span> std::shared_ptr&lt;ISurface&gt;   SharedPtr;
<a name="l00049"></a>00049     <span class="keyword">typedef</span> std::weak_ptr&lt;ISurface&gt;     WeakPtr;
<a name="l00050"></a>00050     <span class="keyword">typedef</span> std::unique_ptr&lt;ISurface&gt;   Ptr;
<a name="l00051"></a>00051     
<a name="l00052"></a>00052 <span class="keyword">public</span>:
<a name="l00057"></a><a class="code" href="class_i_surface.html#ab70567ef2d1f791659441e6d511d5181">00057</a>     <a class="code" href="class_i_surface.html#ab70567ef2d1f791659441e6d511d5181">ISurface</a>(){}
<a name="l00058"></a>00058 
<a name="l00059"></a>00059     <span class="keyword">virtual</span> ~<a class="code" href="class_i_surface.html">ISurface</a>(){}
<a name="l00060"></a>00060 
<a name="l00064"></a>00064     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a419eea3eaca51c031d9b78265f48631e">iid</a>() <span class="keyword">const</span> = 0;
<a name="l00065"></a>00065     
<a name="l00066"></a>00066     
<a name="l00067"></a>00067     <span class="keyword">virtual</span> <span class="keywordtype">void</span> setScene(<a class="code" href="class_scene.html">Scene</a>* scene) = 0;
<a name="l00068"></a>00068 
<a name="l00069"></a>00069     <span class="keyword">virtual</span> <a class="code" href="class_scene.html">Scene</a>* scene() <span class="keyword">const</span> = 0;
<a name="l00070"></a>00070         
<a name="l00075"></a>00075     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classgeometry_1_1_a_a_b_b.html">geometry::AABB</a>&amp; <a class="code" href="class_i_surface.html#a889365120e24bac514f1d437f3d13531">boundingBox</a>() <span class="keyword">const</span> = 0;
<a name="l00076"></a>00076 
<a name="l00084"></a>00084     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_i_surface.html#af199f348a53404b2a9afe4d53320967d">setColor</a>(<span class="keyword">const</span> <a class="code" href="class_color.html">Color</a>&amp; <a class="code" href="class_i_surface.html#a0553f349f4fe8b9e0752fe01e422df35">color</a>) = 0;
<a name="l00085"></a>00085 
<a name="l00093"></a>00093     <span class="keyword">virtual</span> <a class="code" href="class_color.html">Color</a> <a class="code" href="class_i_surface.html#a0553f349f4fe8b9e0752fe01e422df35">color</a>() <span class="keyword">const</span> = 0;
<a name="l00094"></a>00094 
<a name="l00102"></a>00102     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_i_surface.html#a308ae3492b08adf81eb71603cc9c9e77">setSelected</a>(<span class="keywordtype">bool</span> val) = 0;
<a name="l00103"></a>00103 
<a name="l00110"></a>00110     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_i_surface.html#a62c36e72a939cc47af4fb7f5a8e7129b">isSelected</a>() <span class="keyword">const</span> = 0;
<a name="l00111"></a>00111 
<a name="l00120"></a>00120     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a7e75193d5d130a68cff4cf99498ed23a">addVertex</a>(<span class="keyword">const</span> Point3&amp; point) = 0;
<a name="l00121"></a>00121 
<a name="l00131"></a>00131     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a7e75193d5d130a68cff4cf99498ed23a">addVertex</a>(<a class="code" href="class_vertex.html">Vertex</a>* v) = 0;
<a name="l00132"></a>00132 
<a name="l00139"></a>00139     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_i_surface.html#a403cf8cca0dfcc43965a000405ce5e0c">removeVertex</a>( <span class="keywordtype">size_t</span> <span class="keywordtype">id</span>) = 0;
<a name="l00140"></a>00140 
<a name="l00144"></a>00144     <span class="keyword">virtual</span> <a class="code" href="class_vertex.html">Vertex</a>* <a class="code" href="class_i_surface.html#a5776c72d4f1c81b18e2d54d3b0becdb7">vertex</a>(<span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a419eea3eaca51c031d9b78265f48631e">iid</a>) = 0;
<a name="l00145"></a>00145     
<a name="l00149"></a>00149     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="class_vertex.html">Vertex</a>* <a class="code" href="class_i_surface.html#a5776c72d4f1c81b18e2d54d3b0becdb7">vertex</a>(<span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a419eea3eaca51c031d9b78265f48631e">iid</a>) <span class="keyword">const</span> = 0;
<a name="l00150"></a>00150 
<a name="l00154"></a>00154     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#ad6ddd94c54fd415bac6bf17d5db6fc0a">numVertices</a>() <span class="keyword">const</span> = 0;
<a name="l00155"></a>00155 
<a name="l00159"></a>00159     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> addEdge(<span class="keyword">const</span> <a class="code" href="class_edge.html">Edge</a>&amp; edge) = 0;
<a name="l00160"></a>00160 
<a name="l00164"></a>00164     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> addEdge(<span class="keywordtype">size_t</span> v1, <span class="keywordtype">size_t</span> v2) = 0;
<a name="l00165"></a>00165 
<a name="l00176"></a>00176     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a3a8c2686ce030b53fe40d9c5c1235046">addFace</a>( <span class="keyword">const</span> QVector&lt;size_t&gt;&amp; vertexIndexes )=0;
<a name="l00177"></a>00177 
<a name="l00181"></a>00181     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_i_surface.html#a725c3b6e08bae17a345d6ac428cb862a">replaceFace</a>(<span class="keywordtype">size_t</span> index, <span class="keyword">const</span> QVector&lt;size_t&gt;&amp; vertexIndexList)=0;
<a name="l00182"></a>00182 
<a name="l00190"></a>00190     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_i_surface.html#a61483ac0eed9ce967f24c330aaa4321c">removeFace</a>( <span class="keywordtype">size_t</span> <span class="keywordtype">id</span>) =0;
<a name="l00191"></a>00191 
<a name="l00197"></a>00197     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_i_surface.html#a0970ffe01db8cfacabf260231db43e79">numFaces</a>() <span class="keyword">const</span> = 0;
<a name="l00198"></a>00198 
<a name="l00202"></a>00202     <span class="keyword">virtual</span> <a class="code" href="class_face.html">Face</a>* <a class="code" href="class_i_surface.html#a2bffda91521930b47acaec4990afed66">face</a>(<span class="keywordtype">size_t</span> index) = 0;
<a name="l00203"></a>00203 
<a name="l00207"></a>00207     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> getFaceIndexAtPoint(<span class="keyword">const</span> Point3&amp; p) <span class="keyword">const</span> = 0;
<a name="l00208"></a>00208 
<a name="l00212"></a>00212     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> getClosestPointAtPoint(<span class="keyword">const</span> Point3 &amp;p) <span class="keyword">const</span> = 0;
<a name="l00213"></a>00213 
<a name="l00217"></a>00217     <span class="keyword">virtual</span> QVector&lt;size_t&gt; getPointsInRadius(<span class="keyword">const</span> Point3 &amp;p, <span class="keywordtype">float</span> radius) <span class="keyword">const</span> = 0;
<a name="l00218"></a>00218 
<a name="l00222"></a>00222     <span class="keyword">virtual</span> <span class="keywordtype">void</span> adjustPointNormal(<span class="keywordtype">size_t</span> index) = 0;
<a name="l00223"></a>00223 
<a name="l00227"></a>00227     <span class="keyword">virtual</span> <span class="keywordtype">void</span> lock() <span class="keyword">const</span> = 0;
<a name="l00228"></a>00228 
<a name="l00232"></a>00232     <span class="keyword">virtual</span> <span class="keywordtype">void</span> unlock() <span class="keyword">const</span> = 0;
<a name="l00233"></a>00233 
<a name="l00237"></a>00237     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_i_surface.html#a6e0d4a5e3fcc3d79d02ed7924fb7faee">hasChanged</a>()=0;
<a name="l00238"></a>00238 
<a name="l00242"></a>00242     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_i_surface.html#af76ece8998133ea0151f1d899ab09235">setChanged</a>(<span class="keywordtype">bool</span> val)=0;
<a name="l00243"></a>00243 
<a name="l00247"></a>00247     <span class="keyword">virtual</span> QVector&lt;size_t&gt; selectedPoints() <span class="keyword">const</span> = 0;
<a name="l00248"></a>00248     
<a name="l00249"></a>00249     <span class="comment">/*</span>
<a name="l00250"></a>00250 <span class="comment">     *</span>
<a name="l00251"></a>00251 <span class="comment">     */</span>
<a name="l00252"></a>00252     <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSelectedPoints(<span class="keyword">const</span> QVector&lt;size_t&gt;&amp; indicesArray) = 0;
<a name="l00253"></a>00253 
<a name="l00258"></a>00258     <span class="keyword">virtual</span> <a class="code" href="class_iterator.html">Iterator&lt;Vertex&gt;</a> <a class="code" href="class_i_surface.html#a852184671d98db33f9160b40f5aa5e76">vertexIterator</a>() = 0;
<a name="l00259"></a>00259     <span class="keyword">virtual</span> <a class="code" href="class_iterator.html">Iterator&lt;Vertex&gt;</a> constVertexIterator() <span class="keyword">const</span> = 0;
<a name="l00260"></a>00260 
<a name="l00264"></a>00264     <span class="keyword">virtual</span> <a class="code" href="class_iterator.html">Iterator&lt;Face&gt;</a> <a class="code" href="class_i_surface.html#a42b6325545e89a172a7d0585b9f03f2d">faceIterator</a>() = 0;
<a name="l00265"></a>00265 
<a name="l00269"></a>00269     <span class="keyword">virtual</span> <a class="code" href="class_iterator.html">Iterator&lt;Face&gt;</a> <a class="code" href="class_i_surface.html#a67a32caec0e8d348a10eecf6f7c2c3a4">constFaceIterator</a>() <span class="keyword">const</span> = 0;
<a name="l00270"></a>00270 
<a name="l00274"></a>00274     <span class="keyword">virtual</span> <a class="code" href="class_iterator.html">Iterator&lt;Edge&gt;</a> edgeIterator() = 0;
<a name="l00275"></a>00275     
<a name="l00279"></a>00279     <span class="keyword">virtual</span> <a class="code" href="class_iterator.html">Iterator&lt;Edge&gt;</a> constEdgeIterator() <span class="keyword">const</span> = 0;
<a name="l00280"></a>00280 
<a name="l00281"></a>00281 signals:
<a name="l00282"></a>00282     <span class="keywordtype">void</span> meshChanged(<a class="code" href="class_i_surface.html">ISurface</a>* mesh);
<a name="l00283"></a>00283 };
<a name="l00284"></a>00284 
<a name="l00285"></a>00285 <span class="keyword">typedef</span> QVector&lt;ISurface*&gt; ObjectContainer;
<a name="l00286"></a>00286 
<a name="l00287"></a>00287 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu May 31 2012 16:19:51 for QSculpt by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
